home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / a_man / cat1 / timed.z / timed
Encoding:
Text File  |  2002-10-03  |  11.4 KB  |  265 lines

  1.  
  2.  
  3.  
  4. TTTTIIIIMMMMEEEEDDDD((((1111MMMM))))                                                            TTTTIIIIMMMMEEEEDDDD((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      timed - time server daemon
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ////uuuussssrrrr////eeeettttcccc////ttttiiiimmmmeeeedddd [ ----ttttddddMMMM ] [ ----GGGG netgroup] [ ----FFFF host1 host2 ...]
  13.          [ ----nnnn network ] [ ----iiii network ] [ ----PPPP param-file ]
  14.  
  15. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.      _T_i_m_e_d is a time server daemon and is normally invoked at boot time from
  17.      the /etc/init.d/network file.  It synchronizes the host's time with the
  18.      time of other machines in a local area network running _t_i_m_e_d.  These time
  19.      servers will slow down the clocks of some machines and speed up the
  20.      clocks of others to bring them to the average network time.  The average
  21.      network time is computed from measurements of clock differences using the
  22.      ICMP timestamp request message.
  23.  
  24.      _T_i_m_e_d communicates with the _d_a_t_e(1) command in order to set the date
  25.      globally.  Adjustments made by the date command are accumulated by the
  26.      time daemon with all other adjustments.  This means that timed can
  27.      automatically adjust the system clock on an isolated machine, not
  28.      connected to a network.  The adjustments from the date command change the
  29.      _t_i_m_e_t_r_i_m parameter described below.
  30.  
  31.      The service provided by _t_i_m_e_d is based  on a master-slave scheme.  When
  32.      _t_i_m_e_d is started on a machine, it asks the master for the network time
  33.      and sets the host's clock to that time.  After that, it accepts
  34.      synchronization messages periodically sent by the master and calls
  35.      _a_d_j_t_i_m_e(2) to perform the needed corrections on the host's clock.  The
  36.      master adjusts its own clock by averaging the clocks of all trusted
  37.      machines (see below) with its own clock.  If the machine running the
  38.      master crashes, then the slaves elect a new master from among slaves
  39.      running with the ----MMMM flag.  A _t_i_m_e_d running without the ----MMMM, ----FFFF, or ----GGGG
  40.      flags will remain a slave.
  41.  
  42.      Note that "master-slave" suggests things to many people that are not
  43.      true.  A better word than "master" is "moderator."  Unless the clock of
  44.      the so called master is extremely bad, the time it distributes to the so
  45.      called slaves is the median of all of the slaves.  As long as the so
  46.      called master can keep time for the few seconds from when it starts to
  47.      measure the current time of all of the slaves until it sends the
  48.      difference between each slave's clock and the median, the master's clock
  49.      is fine.  Bad clocks are treated the same whether they are on the master
  50.      or a slave.  Times that are very different from the median are discarded,
  51.      and then the median of the remaining times is computed and used.  For
  52.      that reason, it is practically always wrong to run _t_i_m_e_d without the ----MMMM
  53.      flag.
  54.  
  55.      _T_i_m_e_d logs accumulated corrections in the system log (see _s_y_s_l_o_g_d(1M)) to
  56.      ease adjusting the local clock.  The clock can be adjusted by changing
  57.      the _t_i_m_e_t_r_i_m parameter using systune(1M) or with the _s_y_s_s_g_i(2) system
  58.      call.  This parameter is used by the operating system to compensate for
  59.      variations among machines.  It can be used to improve the accuracy of the
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. TTTTIIIIMMMMEEEEDDDD((((1111MMMM))))                                                            TTTTIIIIMMMMEEEEDDDD((((1111MMMM))))
  71.  
  72.  
  73.  
  74.      local clock.  ----PPPP ppppaaaarrrraaaammmm----ffffiiiilllleeee specifies a file in which to save a computed
  75.      value of the _t_i_m_e_t_r_i_m parameter.  The active value in the operating
  76.      system is set to the value found in the file when the daemon started.  An
  77.      error message is displayed when the daemon is first started if the file
  78.      contains nonsense.  However, a corrected value will be placed in the file
  79.      during its normal updates.  A good choice for the file name is
  80.      /_v_a_r/_a_d_m/_t_i_m_e_t_r_i_m.
  81.  
  82.      The ----FFFF flag means only the local machine and the machines _h_o_s_t_1, _h_o_s_t_2,
  83.      etc., are trusted to have good hardware clocks and to be securely
  84.      administered.  Any attempts to change the clocks by other, untrusted
  85.      machines are ignored, except to log them in the system log.  The clocks
  86.      of untrusted machines are not averaged by the master if the master is the
  87.      only trusted machine.  Untrusted clocks that are close to the clock of
  88.      the master are used if there is more than one trusted master active.  A
  89.      master which has been told it is trustworthy will tell untrustworthy
  90.      machines which try to be elected master to be quiet, to "squash" them.
  91.  
  92.      A machine without the ----GGGG or ----FFFF flags trusts all other machines as much as
  93.      it trusts itself.
  94.  
  95.      The clock of a daemon started with ----FFFF llllooooccccaaaallllhhhhoooosssstttt and without ----GGGG "free
  96.      runs." In other words, if the machine does not trust any other machines,
  97.      it does not try to adjust its own clock.
  98.  
  99.      The ----GGGG flag is used to specify a netgroup (see _n_e_t_g_r_o_u_p(4)) of trusted
  100.      machines.  This flag allows central administration of the list of trusted
  101.      machines.  Making gateways trusted ties the clocks in an internet
  102.      together, because after a network partition is healed, the trusted
  103.      gateways will suppress the upstart local master elected during the
  104.      partition.
  105.  
  106.      _T_i_m_e_d requests synchronization service from the first master server
  107.      located.  If permitted by the ----MMMM flag, it will provide synchronization
  108.      service on any attached networks on which no current master server was
  109.      detected.  Such a server propagates the time computed by the top-level
  110.      master.  The ----nnnn flag, followed by the name of a network which the host is
  111.      connected to (see _n_e_t_w_o_r_k_s(4)), overrides the default choice of the
  112.      network addresses made by the program.  Each time the ----nnnn flag appears,
  113.      that network name is added to a list of valid networks.  All other
  114.      networks are ignored.  The ----iiii flag, followed by the name of a network to
  115.      which the host is connected (see _n_e_t_w_o_r_k_s(4)), overrides the default
  116.      choice of the network addresses made by the program.  Each time the ----iiii
  117.      flag appears, that network name is added to a list of networks to ignore.
  118.      All other networks are used by the time daemon.  The ----nnnn and ----iiii flags are
  119.      meaningless if used together.
  120.  
  121.      The ----tttt flag causes _t_i_m_e_d to trace the messages it receives in the file
  122.      /var/adm/timed.log.  Tracing can be turned on or off by the program
  123.      _t_i_m_e_d_c(1M).  Beware that the log file grows very quickly in a large
  124.      network.
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. TTTTIIIIMMMMEEEEDDDD((((1111MMMM))))                                                            TTTTIIIIMMMMEEEEDDDD((((1111MMMM))))
  137.  
  138.  
  139.  
  140.      The ----dddd flag is for debugging the daemon.  It causes the program to not
  141.      put itself into the background.
  142.  
  143.      _T_i_m_e_d checks for a master time server on each network to which it is
  144.      connected, except as modified by the ----nnnn and ----iiii options described above.
  145.      If it finds masters on more than one network, it chooses one network on
  146.      which to be a "slave," and then periodically checks the other networks to
  147.      see if the masters there have disappeared.
  148.  
  149.      The _t_i_m_e_s_l_a_v_e(1M) daemon can be used to inexpensively synchronize the
  150.      clock on a machine to the clock on a remote machine.  It does not require
  151.      any daemons or special programs on the remote machine.
  152.  
  153.      One way to synchronize a group of IRIS's is to use timeslave to
  154.      synchronize the clock of one machine to a distant standard or a radio
  155.      receiver and ----FFFF hhhhoooossssttttnnnnaaaammmmeeee to tell its timed daemon to trust only itself.
  156.  
  157.      Messages printed by the kernel on the system console occur with
  158.      interrupts disabled.  This means that the clock stops while they are
  159.      printing.  A machine with many disk or network hardware problems and
  160.      consequent messages cannot keep good time by itself.  Each message
  161.      typically causes the clock to lose a dozen milliseconds.  A time daemon
  162.      can correct the result, but will compute a bogus timetrim value.
  163.  
  164.      Messages in the system log about machines that failed to respond usually
  165.      indicate machines that crashed or were turned off.  Complaints about
  166.      machines that failed to respond to initial time settings are often
  167.      associated with "multi-homed" machines that looked for time masters on
  168.      more than one network and eventually chose to become a slave on the other
  169.      network.
  170.  
  171. WWWWAAAARRRRNNNNIIIINNNNGGGG
  172.      If two or more time daemons, whether _t_i_m_e_d, _t_i_m_e_s_l_a_v_e, or NTP, try to
  173.      adjust the same clock, temporal chaos will result.  If both _t_i_m_e_d and
  174.      _t_i_m_e_s_l_a_v_e are run on the same machine, ensure that the ----GGGG flag is not
  175.      used but that the ----FFFF flag is used, so that _t_i_m_e_d never attempts to adjust
  176.      the local clock.
  177.  
  178.      The protocol is based on UDP/IP broadcasts.  All machines within the
  179.      range of a broadcast that are using the TSP protocol must cooperate.
  180.      There cannot be more than a single administrative domain using the ----FFFF or
  181.      ----GGGG flags among all machines reached by a broadcast packet.  Failure to
  182.      follow this rule is usually indicated by complaints concerning
  183.      "untrusted" machines in the system log.
  184.  
  185. FFFFIIIILLLLEEEESSSS
  186.      /var/adm/timed.log           tracing file for timed
  187.      /var/adm/SYSLOG              system log
  188.      /etc/init.d/network          start-up script
  189.      /etc/config/timed.options    optional flags, by default
  190.                                   "-G timelords -P /var/adm/timetrim"
  191.      /var/adm/timetrim            default file for timetrim accumulation
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. TTTTIIIIMMMMEEEEDDDD((((1111MMMM))))                                                            TTTTIIIIMMMMEEEEDDDD((((1111MMMM))))
  203.  
  204.  
  205.  
  206. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  207.      chkconfig(1M), date(1), adjtime(2), gettimeofday(2), icmp(4P),
  208.      timedc(1M), timeslave(1M), systune(1M)
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.